package com.hwj.service.Impl;

import com.hwj.entity.RolePermission;
import com.hwj.mapper.RolePermissionMapper;
import com.hwj.service.RolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RolePermissionServiceImpl implements RolePermissionService {
    @Autowired
    RolePermissionMapper rolePermissionMapper;
    @Override
    public RolePermission selectByPrimaryKey(Long roleId, Long permissionId) {
        return rolePermissionMapper.selectByPrimaryKey(roleId,permissionId);
    }

    @Override
    public List<RolePermission> queryByRoleId(Long roleId) {
        return rolePermissionMapper.queryByRoleId(roleId);
    }

    @Override
    public int deleteByPrimaryKey(Long roleId,Long permissionId) {
        return rolePermissionMapper.deleteByPrimaryKey(roleId,permissionId);
    }

    @Override
    public int insert(RolePermission record) {
        return rolePermissionMapper.insert(record);
    }

    @Override
    public int insertSelective(RolePermission record) {
        return rolePermissionMapper.insertSelective(record);
    }

    @Override
    public int updateByPrimaryKeySelective(RolePermission record) {
        return rolePermissionMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(RolePermission record) {
        return rolePermissionMapper.updateByPrimaryKey(record);
    }

    @Override
    public int deleteByRoleId(Long roleId) {
        return rolePermissionMapper.deleteByRoleId(roleId);
    }
}
